// 
//  Department.m
//  Prospectus
//
//  Created by Ken Power on 16/01/2011.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import "Department.h"
#import	"DataAccess.h"
#import "Person.h"
#import "Programme.h"

@implementation Department 

@synthesize Abbreviation;
@synthesize Name;
@synthesize Programmes;
@synthesize Head;

- (void) initWithSQL:(sqlite3_stmt*)sql{
	
	//Z_PK INTEGER PRIMARY KEY,0
	//Z_ENT INTEGER, 1
	//Z_OPT INTEGER, 2
	//ZHEAD INTEGER, 3


	//ZNAME VARCHAR 5
	//sqlString= (char *)sqlite3_column_text(sql, 5);
	self.Name = [DataAccess getStringFrom:sql InCol:5];

	//ZABBREVIATION VARCHAR, 4 
	//sqlString= (char *)sqlite3_column_text(sql, 4);
	self.Abbreviation = [DataAccess getStringFrom:sql InCol:4];
}

- (void)dealloc {
	[Name release];
	[Abbreviation release];
	[Programmes release];
	
	[super dealloc];
}
	
@end
